package com.dhcc.bpm.modules.workflow.service;

import com.dhcc.bpm.common.json.JSONObject;
import com.dhcc.bpm.modules.workflow.dto.ProcessStartDto;
import com.dhcc.bpm.modules.workflow.dto.TaskCommitDto;
import com.dhcc.bpm.modules.workflow.dto.TaskDto;
import org.springblade.core.tool.api.R;

/**
 * @ClassName IWorkFlowService
 * @Description 工作流
 * @Author xiafayu
 * @Date 2020/2/21 0021 15:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 **/
public interface IWorkFlowService {

    /**
     * @Description 提交任务
     * @Author xiafayu
     * @Date 2020/2/24 20:42
     * @param taskCommitDto
     * @return com.dhcc.bpm.common.json.JSONObject
     * @throws
     **/
    JSONObject commit(TaskCommitDto taskCommitDto);

    /**
     * @Description 删除任务
     * @Author lizeyu
     * @Date 2020/2/24 20:42
     * @param executionId, appId, taskId
     * @return com.dhcc.bpm.common.json.JSONObject
     * @throws
     **/
    R delete(String executionId, String appId, String taskId);

    R deleteRelated(String type, String appId);

    /**
     * @Description 执行任务
     * @Author xiafayu
     * @Date 2020/2/24 20:42
     * @param processStartDto
     * @return com.dhcc.bpm.common.json.JSONObject
     * @throws
     **/
    JSONObject start(ProcessStartDto processStartDto);

    /**
     * @Description 查询任务
     * @Author xiafayu
     * @Date 2020/2/24 20:42
     * @param taskDto
     * @param isHistory
     * @return com.dhcc.bpm.common.json.JSONObject
     * @throws
     **/
    JSONObject taskList(TaskDto taskDto, String isHistory);

    /*
     * @Description 根据id查询名称
     * @Author xiafayu
     * @Date 2020/12/25 15:41
     * @param json
     **/
    String getNameById(JSONObject json);
    /*
     * @Description 刷新网关api
     * @Author xiafayu
     * @Date 2020/12/25 15:41
     **/
    void refreshApi(String id);
    /*
     * @Description 刷新网关app
     * @Author xiafayu
     * @Date 2020/12/25 15:41
     **/
    void refreshApp(String id);

    TaskDto findBytask(TaskDto taskDto);
}
